<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        {{username}} {{age}} {{user.name}}
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>
    <script>
        const vue = new Vue({
            el: '#app',
            data: {
                username: '',
                age: 0,
                user: {
                    name: 'dcj',
                    password: null
                }
            },
            beforeCreate() {
                console.log("beforeCreate");
            },
            created() {
                console.log("created");
            },
            beforeMount() {
                console.log("beforeMount");
            },
            mounted() {
                console.log("mounted");
            },
            beforeUpdate() {
                console.log("beforeUpdate");
            },
            updated() {
                console.log("updated");
            },
            beforeDestory() {
                console.log("beforeDestory");
            },
            destoryed() {
                console.log("destoryed");
            }
        })
    </script>
</body>
</html>